#!/bin/bash # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Parameters - "" # Description - Script to delete User # Configuration Type - COMPUTER if [ $# == '1' ]; then dscl . -delete "/Users/$1" ret=$? if [ $ret == "0" ]; then echo "Successfully completed" else echo "Error in executing code" fi exit $ret else echo "Invalid Arguments - Please refer description of the script" exit 1 fi